<template>
  <div class="my_div">
    <img :src="src" />
    <p @click="btnFn">这是一条{{ title }}</p>
  </div>
</template>

<script>
export default {
  props: ["src", "title"],
  methods:{
    btnFn(){
      // console.log(this.title);
      this.$emit('harry',this.title,1)
    }
  }
};
</script>

<style>
.my_div {
  width: 200px;
  border: 1px solid black;
  text-align: center;
  float: left;
}

.my_div img {
  width: 100%;
  height: 200px;
}
</style>